package swa2012.telco.broker.beans;

public class Message {
	private Client sender;
	private Client receiver;
	private String text;
	private Long timestamp;
	
	public Message() {		
	}
	
	public Message(Client sender, Client receiver, String text, Long timestamp) {
		this.sender = sender;
		this.receiver = receiver;
		this.text = text;
		this.timestamp = timestamp;
	}
	
	public Client getSender() {
		return sender;
	}
	public void setSender(Client sender) {
		this.sender = sender;
	}
	public Client getReceiver() {
		return receiver;
	}
	public void setReceiver(Client receiver) {
		this.receiver = receiver;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public Long getTimestamp() {
		return timestamp;
	}
	public void setTimestamp(Long timestamp) {
		this.timestamp = timestamp;
	}
	
	@Override
	public String toString() {
		return this.getClass().getSimpleName() + "["+ this.timestamp+":"+ this.sender + "->"+ this.receiver +"]";
	}
}
